function [ mask ] = MaskImage( image )
%MASKIMAGE Summary of this function goes here
%   Detailed explanation goes here

e = 0.02; %something small

imgray = double(rgb2gray(image)) / 255;
ibw = im2bw(imgray, imgray(1,1) - e);

label = bwlabel(ibw);

mask = zeros(size(label));
mask(label == label(1,1)) = 1;

end

